package com.study.utils;

import com.study.bean.Grade;
import com.study.bean.UserInfo;
import com.study.service.UserInfoService;

import javax.validation.groups.Default;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @author zhuzi
 * 2023/8/11 10:22
 */
public class ValidationTest {
    public static void main1(String[] args) {
        UserInfo userInfo = new UserInfo();
        userInfo.setName("nam");
        userInfo.setEmail("qa@qq.com");
        userInfo.setAge(19);
        //userInfo.setId(1L);
        userInfo.setBirthDay(LocalDateTime.now());
        Grade grade = new Grade();
        grade.setNo("No1");
        userInfo.setGrade(grade);
        //新增校验
        List<String> valid = ValidationUtil.valid(userInfo, UserInfo.Add.class, Default.class);
        System.out.println(valid);

    }

    public static void main(String[] args) {

        UserInfoService service = new UserInfoService();
        service.getByName(null);
    }
}

